package com.fzy.core.utils;

public class BooleanUtils extends org.apache.commons.lang.BooleanUtils {
	public static String TRUE = "true";
	public static String FALSE = "false";

	public static boolean toBoolean(String src, boolean defaultValue) {
		boolean result = defaultValue;
		if (StringUtils.isBlank(src))
			return result;
		src = StringUtils.trim(src).toLowerCase();
		if ("1".equals(src))
			return true;
		if ("0".equals(src))
			return false;
		Boolean x = toBooleanObject(src);
		return x == null ? defaultValue : x.booleanValue();
	}
}
